package com.gn.heavenpark.activity;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TabHost;
import android.widget.TabHost.OnTabChangeListener;

public class MyPage extends TabActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.my_page);
	
		Intent scan = new Intent(this, Rest.class);
		Intent schedule = new Intent(this, Schedule.class);
		Intent search = new Intent(this, Search.class);
		Intent mypage = new Intent(this, MyPageView.class);
		Intent setup = new Intent(this, MemberLogin.class);
		
	/*
		TabHost tabs = getTabHost();
	
		tabs.addTab(tabs.newTabSpec("tab1").setIndicator("",getResources().getDrawable(R.drawable.scan_btn)).setContent(scan));
		tabs.addTab(tabs.newTabSpec("tab2").setIndicator("", getResources().getDrawable(R.drawable.schedule_btn)).setContent(schedule));
		tabs.addTab(tabs.newTabSpec("tab3").setIndicator("", getResources().getDrawable(R.drawable.search_btn)).setContent(search));
		tabs.addTab(tabs.newTabSpec("tab4").setIndicator("", getResources().getDrawable(R.drawable.my_page_btn)).setContent(mypage));
		tabs.addTab(tabs.newTabSpec("tab5").setIndicator("", getResources().getDrawable(R.drawable.setup_btn)).setContent(setup));
		
		tabs.setCurrentTab(3);
	*/

		TabHost tabHost=(TabHost)findViewById(android.R.id.tabhost);
		//TabHost tabHost=getTabHost();
		tabHost.setup();
		TabHost.TabSpec spec;
		
		LayoutInflater layout=getLayoutInflater();
		
		
		spec=tabHost.newTabSpec("scan");
		View vTab1 = layout.inflate(R.drawable.bottom_tab_scan, null);
		// TextView textsample = (TextView)vTab1.findViewById(Rid.textsample);
		// textsmaple.setText("샘플1")ㅣ
		spec.setIndicator(vTab1);
		spec.setContent(scan);
		tabHost.addTab(spec);
	
		
		spec=tabHost.newTabSpec("schedule");
		View vTab2 = layout.inflate(R.drawable.bottom_tab_schedule, null);
		spec.setIndicator(vTab2);
		spec.setContent(schedule);
		tabHost.addTab(spec);
	
	
		spec=tabHost.newTabSpec("search");
		View vTab3 = layout.inflate(R.drawable.bottom_tab_search, null);
		spec.setIndicator(vTab3);
		spec.setContent(search);
		tabHost.addTab(spec);
		
		spec=tabHost.newTabSpec("mypage");
		View vTab4 = layout.inflate(R.drawable.bottom_tab_mypage, null);
		spec.setIndicator(vTab4);
		spec.setContent(mypage);
		tabHost.addTab(spec);
		
		spec=tabHost.newTabSpec("setup");
		View vTab5 = layout.inflate(R.drawable.bottom_tab_setup, null);
		spec.setIndicator(vTab5);
		spec.setContent(setup);
		tabHost.addTab(spec);
		
		tabHost.setCurrentTab(3);
		
		
		
		}
		
	
}
